Skip to content

fix: properly reset mock in test_hive_wait_for_lock#3047

Closed
sumedhsakdeo wants to merge 1 commit intoapache:mainfrom
sumedhsakdeo:fix/hive-wait-for-lock-test
Closed

fix: properly reset mock in test_hive_wait_for_lock#3047
sumedhsakdeo wants to merge 1 commit intoapache:mainfrom
sumedhsakdeo:fix/hive-wait-for-lock-test

Conversation

@sumedhsakdeo
Copy link

@sumedhsakdeo sumedhsakdeo commented Feb 15, 2026

Summary

  • Fix flaky test_hive_wait_for_lock test by using reset_mock() instead of manually setting call_count = 0
  • Setting mock.call_count = 0 does not reset the mock's internal call tracking, causing the second assertion to see accumulated calls from both test phases (expected 5, got 8)

Test plan

  • Verify test_hive_wait_for_lock passes consistently across all Python versions in CI

Setting `mock.call_count = 0` does not actually reset the mock's
internal call tracking, causing the second assertion to see accumulated
calls from both test phases. Use `reset_mock()` instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Fokko
Copy link
Contributor

Fokko commented Feb 15, 2026

@sumedhsakdeo Thanks for raising this PR. Can you share the issue that you're seeing? It looks like the CI is working fine

@Fokko
Copy link
Contributor

Fokko commented Feb 15, 2026

Ah, I see that @geruh beat you to it: #3043 Thanks anyway!

@Fokko Fokko closed this Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants